<include file="Public:header" />
<div class="container main"> <include file="Public:left" />
  <div class="w790">
    <div class="h">
      <form action="{:U('order')}" method="get" class="fr form-inline">
      <input name="id" type="hidden" value="{$Think.get.id}">
      
     <select name="status" id="status" class="form-control">
          <option value="">订单状态</option>
         
            <option <eq name="status" value="2">selected="selected"</eq> value="2">已付款</option>
            <option <eq name="status" value="1">selected="selected"</eq> value="1">未付款</option>
            <option <eq name="status" value="0">selected="selected"</eq> value="0">已取消</option>
            <option <eq name="status" value="6">selected="selected"</eq> value="6">退款中</option>
        </select>
      
      
      <input type="hidden" name="bid" value="{$Think.get.bid}">
      
      下单时间：<input class="form-control" type="text" onclick="WdatePicker();" name="stime" value="{$stime}" /> 至 <input class="form-control" type="text" onclick="WdatePicker();" name="etime" value="{$etime}" />
      
        
        <input type="hidden" name="pagesize" value="{$pagesize}" />
        <input type="text" name="keywords" placeholder="输入订单号搜索" class="form-control" value="{$keywords}" />
        <button type="submit" class="btn btn-default">搜索</button>
      </form> 
      
      <div style="clear:both;"></div>
      </div>
     <div class="table_"><table class="table table-bordered" width="100%" border="0" cellspacing="0" cellpadding="0">
 <thead>
 <tr>
    <td align="center">ID</td>
     
    <td align="center">收货信息</td>
    <td align="center">订单号</td>
    <td align="center">总价</td>
    <td align="center">配送方式</td>
    <td align="center">用户留言</td>
    <td align="center">状态</td>
    <td align="center">下单时间</td>
    <td align="center">操作</td>
  </tr>
</thead>

<volist name="list" id="vo">

  <tr class="data_list">
    <td align="center"><input type="checkbox" name="id" id="id" class="sall" value="{$vo.id}" />{$vo.id}</td>
    
    <td>收货人：{$vo.yourname}　会员ID:{$vo.member_id}<br>
电话：{$vo.tel}<br>
地址：{$vo.address}

<notempty name="vo['taxtitle']">
<br>
发票抬头:<span style="color:#f00;">{$vo['taxtitle']}</span>
</notempty>
</td>
    <td align="center">{$vo.ordernumber}</td>
    <td><span style="color:#f00; font-weight:bold; font-size:14px;">¥<span class="ajaxText" tablename="Order" field="total" id="{$vo.id}" val="{$vo.total}" >{$vo.total}</span></span></td>
    <td align="center">{:getShippingName($vo['shipping_id'])}(<span style="color:#f00; font-weight:bold; font-size:14px;">¥{$vo.shipping_fee}</span>)</td>
    <td align="center">{$vo.Guestbook}</td>
    <td align="center">
    <eq name="vo['pay_status']" value="3"><span style="color:#f00; font-weight:bold;">已经退款</span>
<else/>
    <eq name="vo['status']" value="0">已取消</eq>
    <eq name="vo['status']" value="1">待支付</eq>
    <eq name="vo['status']" value="2">已支付</eq>
    <eq name="vo['shipping_status']" value="0">未发货</eq>
    <eq name="vo['shipping_status']" value="1">部分发货</eq>
    <eq name="vo['shipping_status']" value="2">全部发货</eq>
    <eq name="vo['shipping_status']" value="3">部分确认</eq>
    <eq name="vo['shipping_status']" value="4">全部确认</eq>
    <eq name="vo['service_status']" value="1">退货</eq>
    <eq name="vo['service_status']" value="2">换货</eq>
    </eq>
    </td>
    <td align="center">{:date('Y-m-d H:i:s',$vo['create_time'])}</td>
    <td align="center">
    
    
    
    
    
    
    <a href="{:U('refund', array('sale_id' => $vo['sale_id']))}">退款</a> | 
    <eq name="vo['status']" value="1"> 
     <a href="" class="btn btn-primary" data-toggle="modal" data-target="#myModal"  style="font-size:12px;" onClick=" document.getElementById('order_id').value={$vo.id}" >付款</a>  |  
     </eq> 
      
     
     <a href="{:U('Order/edit',array('id'=>$vo['id']))}" >查看</a> | <a href="{:U('Order/delete',array('id'=>$vo['id']))}"  onclick="return confirm('您确定要删除这条记录吗？');">删除</a>
    
    <!-- 退款审核确认 -->
      <if condition="$vo.status eq 6">
        <a href="{:U('refund',array('id'=>$vo['id']))}" class="btn btn-primary" >退款审核</a>
      </if>
    <!-- end -->
    </td>
  </tr>
</volist>
</table>
 
      <div class="pages">
        <div class="controlList fl">
        
         
        <a href="javascript:void(0);" class="btn btn-primary btn-sm" onclick="sall();"><i class="glyphicon glyphicon-check"></i> 全选/反选</a> <a href="javascript:void(0);" class="btn btn-primary btn-sm" onclick="rall();"><i class="glyphicon glyphicon-unchecked"></i> 全不选</a> <a class="btn btn-danger btn-sm" href="javascript:void(0);" onclick="delall();"><i class="glyphicon glyphicon-trash"></i> 删除选中</a> <a href="javascript:void(0);" class="btn btn-primary btn-sm" onclick="update_sort('id','sort','','{:U('dosort')}');"><i class="glyphicon glyphicon-refresh"></i> 更新排序</a> 
        
        </div>
        <form class="fr" style="display:inline;" id="pagesize" action="" method="get">
         <label class="form-inline"> 每页
          <select name="pagesize" onchange="document.getElementById('pagesize').submit();" class="form-control">
            <option 
            <eq name="pagesize" value="10">selected="selected"</eq>
             value="10">10
            </option>
            <option 
            <eq name="pagesize" value="20">selected="selected"</eq>
             value="20">20
            </option>
            <option 
            <eq name="pagesize" value="30">selected="selected"</eq>
             value="30">30
            </option>
            <option 
            <eq name="pagesize" value="50">selected="selected"</eq>
             value="50">50
            </option>
            <option 
            <eq name="pagesize" value="100">selected="selected"</eq>
             value="100">100
            </option>
            <option 
            <eq name="pagesize" value="500">selected="selected"</eq>
             value="500">500
            </option>
          </select>
          条</label>
          <input type="hidden" name="category_id" value="{$category_id}" />
          <input type="hidden" name="keywords" value="{$keywords}" />
        </form>
        <div class="fr">{$pages}</div>
      </div>
      
      
      
      
    </div>
  </div>
  <div class="clear"></div> 
  
  <!-- 物流弹出框 -->
  
  <!-- Modal -->
<form action="{:U('payment')}" method="post">
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
      <div class="modal-dialog" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title" id="myModalLabel">付款操作</h4>
          </div>
          <div class="modal-body">
            <label for="exampleInputName2"></label>
            <br>
            <input type="hidden" value="" id="order_id" name="order_id">
            <input type="text" class="form-control" id="exampleInputName2" name="remark" placeholder="请填写操作理由">
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            <button type="submit" class="btn btn-primary">确认</button>
          </div>
        </div>
      </div>
    </div>
</form>  
</div>
<include file="Public:footer" />